﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Webtest_view.DbFunction;

namespace webtest_view
{
    public partial class insert_user : System.Web.UI.Page
    {
        dbConnect conn = new dbConnect();


        protected void page_load(object sender, EventArgs e)
        {

        }

        protected void button1_click(object sender, EventArgs e)
        {
            string name = textbox1.Text;
            string address = textbox2.Text;
            string bdate = textbox3.Text;


            string query = "insert into [user]  values('" + name + "','" + address + "','" + bdate + "')";

            try
            {
                bool check = conn.insertValues(query);

                if (check)
                    label1.Text = "date inserted";
            }
            catch (System.Exception ex)
            {
                label1.Text = ex.Message;
            }
        }
    }
}
